using System;
using System.Collections.Generic;
using System.Text;
using Curchy.PERTToolbox.Interface;
using System.ComponentModel;

namespace Curchy.PERTToolbox.Entity
{
    public class Estimation : IDescriptive
    {
        private Project _project;
        private DateTime _dateTime;

        private TimeSpan _estProbable;
        private TimeSpan _estOptimistic;
        private TimeSpan _estPessimistic;

        #region Property Accessors

        public Project Project
        {
            get { return _project; }
            set { _project = value; }
        }

        public DateTime DateTime
        {
            get { return _dateTime; }
            set { _dateTime = value; }
        }

        public TimeSpan EstProbable
        {
            get { return _estProbable; }
            set { _estProbable = value; }
        }

        public TimeSpan EstOptimistic
        {
            get { return _estOptimistic; }
            set { _estOptimistic = value; }
        }

        public TimeSpan EstPessimistic
        {
            get { return _estPessimistic; }
            set { _estPessimistic = value; }
        }

        #endregion

        #region IDescriptive Members

        public string Name
        {
            get { return "Estimate for project " + _project.Name + " @ " + _dateTime.ToString(); }
        }

        [Browsable(false)]
        public string Description
        {
            get { return "pro: " + _estProbable + ", pes: " + _estPessimistic.ToString() + ", opt: " + _estOptimistic.ToString(); }
        }

        #endregion
    }
}
